<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>导航栏</title>
    
	<script type="text/javascript" src="js/dtree.js"></script>
	
	<script type="text/javascript" src="dwr/engine.js" ></script>
	<script type="text/javascript" src="dwr/interface/ddCategoryAction.js"></script>
	
	<link rel="StyleSheet" href="css/dtree.css" type="text/css" />
	<link rel="StyleSheet" href="css/leftStyle.css" type="text/css" />
	<link rel="StyleSheet" href="css/commonStyle.css" type="text/css" />
  </head>
  
  <body>
  <img alt="" src="img/title.png">
  <div id="top">
  	<a href="javascript:d.openAll()">打开全部</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:d.closeAll()">关闭全部</a>
  </div>
  <div id="tree">
  <script type="text/javascript">
  	<!--
	var ddCategoryArr;
  	dwr.engine.setAsync(false);
  	ddCategoryAction.loadDDCategories(load);
  	dwr.engine.setAsync(true);
	function load(data) {
		ddCategoryArr = data;
  	}
  	
  	d = new dTree("d");
  	d.config.useCookies = false;
  	d.config.useStatusText = true;
  	d.config.closeSameLevel = true;
  	
  	d.add(0,-1,"客户关系管理系统");
  	d.add(1,0,"客户信息");
  	d.add(2,0,"客户服务");
  	d.add(3,0,"日程/任务");
  	d.add(4,0,"项目管理");
  	d.add(5,0,"系统管理");
  	d.add(6,0,"数据字典");
  	d.add(7,0,"消息提醒");

  	d.add(11,1,"客户", "CustomerInfo_list.action" , "" , "right");
  	d.add(12,1,"联系人", "Contact_list.action" , "" , "right");

  	d.add(21,2,"客户投诉" , "Complain_list.action" , "" , "right");
  	d.add(22,2,"投诉报表", "Complain_reportForm.action" , "" ,"right");
  	
  	d.add(31,3,"日程", "Schedule_list.action" , "" , "right");
  	d.add(32,3,"任务", "Mission_list.action" , "" ,"right");

  	d.add(41,4,"项目立项");
  	d.add(42,4,"项目审批");
  	d.add(43,4,"项目进程");
  	d.add(44,4,"项目总结");
  	d.add(45,4,"项目交易");

  	d.add(51,5,"用户" , "User_list.action" , "" , "right");
  	d.add(52,5,"角色" , "RoleInfo_list.action" , "" ,"right");

  	d.add(50 , 6 , "数据字典-分类" , "DDCategory_list.action" , "" , "right");
  	var x;
  	for(x = 0; x < ddCategoryArr.length; x++) {
  	  	if(ddCategoryArr[x].name != null && ddCategoryArr[x].name != "" && ddCategoryArr[x].variable == "yes")
			d.add(51 + x, 6, ddCategoryArr[x].name , "DDInfo_list.action?ddCategoryId=" + ddCategoryArr[x].id , "" , "right");
	}
  	d.add(51 + x, 6, "客户级别-分类" , "CustomerGrade_list.action" , "" , "right");

  	d.add(61,7,"消息提醒");
  	d.add(62,7,"短消息");
  	
	document.write(d);
	
  	-->
  </script>
  </div>
  </body>
</html>
